﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

using G28BS.GameModels;

namespace G28BS.Models
{
    public class AppDataContext : DbContext
    {
        public DbSet<UserProfile> UserProfiles { get; set; }
        public DbSet<GameRoom> GameRooms { get; set; }
        public DbSet<FinishedGame> FinishedGames { get; set; }
        public DbSet<Slot> Slots { get; set; }
        public DbSet<Invitation> Invites { get; set; }
        public DbSet<Game> Games { get; set; }
        public DbSet<GameResult> GameResults { get; set; }
        public DbSet<Event> Events { get; set; }
        public DbSet<Group> Groups { get; set; }
        public DbSet<Tournament> Tournaments { get; set; }
        //public DbSet<Rank> Ranks { get; set; }
        public DbSet<RankmkII> RankIIs { get; set; }
        public DbSet<tttResult> tttResults { get; set; }
        public DbSet<Error> errors { get; set; }

        //protected override void OnModelCreating(DbModelBuilder modelBuilder)
        //{
        //    modelBuilder.Entity<UserProfile>().HasOptional(u => u.userRank).WithRequired();

        //    modelBuilder.Entity<Rank>().HasRequired(u => u.userId).WithOptional();
        //}

        // For Fimbulfamb put in here since it looks like it is not trivial to add a dataContext after the fact.
        public DbSet<FimbulfambWord> FimbulfambWords { get; set; }
    }
}